@echo off
echo 🚀 测试通知API功能...
echo.

echo 1. 测试用户登录...
curl -X POST http://localhost:5000/api/auth/login/email ^
  -H "Content-Type: application/json" ^
  -d "{\"email\":\"admin@aide.com\",\"password\":\"admin123456\"}" ^
  > temp_login.json

echo.
echo 2. 提取token...
for /f "tokens=2 delims=:, " %%a in ('type temp_login.json ^| findstr "token"') do set TOKEN=%%~a
set TOKEN=%TOKEN:"=%

echo Token: %TOKEN%
echo.

echo 3. 测试获取通知设置...
curl -X GET http://localhost:5000/api/notifications/settings ^
  -H "Authorization: Bearer %TOKEN%" ^
  -H "Content-Type: application/json"

echo.
echo.

echo 4. 测试检查提醒...
curl -X POST http://localhost:5000/api/notifications/check-reminders ^
  -H "Authorization: Bearer %TOKEN%" ^
  -H "Content-Type: application/json"

echo.
echo.

echo 5. 测试获取每日总结...
curl -X GET http://localhost:5000/api/notifications/daily-summary ^
  -H "Authorization: Bearer %TOKEN%" ^
  -H "Content-Type: application/json"

echo.
echo.

echo 6. 清理临时文件...
del temp_login.json

echo 🎉 测试完成！
